package com.wbc.smartHome.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.Date;

@Component
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value ="热门话题模型类")
public class HotSpot implements Serializable {
    @ApiModelProperty(value = "社区活动id")
    private Integer id;
    @ApiModelProperty(value = "话题id")
    private Integer spotId;
    @ApiModelProperty(value = "封面图")
    private String img;//封面图
    @ApiModelProperty(value = "话题类型（1为正常、2为跳转）")
    private Integer spotType;//1为正常、2为跳转
    @ApiModelProperty(value = "外链")
    private String url;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//接收前端提交数据的日期格式
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")//后端向前端转json时的日期格式
    private Date operTime;
}
